<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
  <title>导航</title>
  <!--link-->
  <link rel="stylesheet" href="../../lib/bootstrap-5.1.3-dist/css/bootstrap.css">
  <link rel="stylesheet" href="../../lib/weui/weui.css">
  <link rel="stylesheet" href="../mycss.css">
  <script src="../../lib/jquery/jquery-3.6.1.js"></script>
  <script src="../../lib/axios/axios.js"></script>
  <script src="../../util/httpRequest.js"></script>
  <script src="../../lib/vue/vue.js"></script>
</head>
<body>
<!--<div class="container-fluid" style="height: 100%;">-->
<div class="weui-tab" id="root">
  <div id="panel1" role="tabpanel" aria-labelledby="tab1" class="weui-tab__panel">
    <div class="weui-cells__title">请选择需要查询的信息</div>
    <div class="weui-cells">
      <div role="link" aria-labelledby="js_cell_l1_bd js_cell_l1_tips" aria-describedby="js_cell_l1_note" class="weui-cell weui-cell_active weui-cell_access" id="link1" @click="link1">
        <div aria-hidden="true" class="weui-cell__bd" id="js_cell_l1_bd">学业状况查询</div>
        <div aria-hidden="true" class="weui-cell__ft" id="js_cell_l1_bd" style="font-size: 0;">
          <span class="demo_badge_tips" id="js_cell_l1_tips">详细信息</span>
          <!--<span id="js_cell_l1_note" aria-label="，有更新" class="weui-badge weui-badge_dot"></span>-->
        </div>
      </div>
    </div>
  </div>
  <div id="panel2" role="tabpanel" aria-labelledby="tab2" class="weui-tab__panel" style="display: none;">
    <div class="page__bd page__bd_spacing">
      <a href="javascript:" role="button" class="weui-btn weui-btn_default" id="showIOSActionSheet">解绑微信</a>
    </div>
    <!--BEGIN actionSheet-->
    <div>
      <div class="weui-mask" id="iosMask" style="display: none;"></div>
      <div role="dialog" aria-modal="true" tabindex="0" aria-hidden="true" class="weui-actionsheet" id="iosActionsheet">
        <div class="weui-actionsheet__title">
          <p class="weui-actionsheet__title-text">是否解绑</p>
        </div>
        <div class="weui-actionsheet__menu">
          <div id="unbind" role="button" tabindex="0" class="weui-actionsheet__cell weui-actionsheet__cell_warn">确认解绑</div>
        </div>
        <div class="weui-actionsheet__action">
          <div role="button" tabindex="0" class="weui-actionsheet__cell" id="iosActionsheetCancel">取消</div>
        </div>
      </div>
    </div>
    <!--END actionSheet-->
  </div>
  <div role="tablist" aria-label="选项卡标题" class="weui-tabbar">
    <div id="tab1" role="tab" aria-labelledby="t1_title" aria-describedby="t1_tips" aria-selected="true" aria-controls="panel1" class="weui-tabbar__item weui-bar__item_on">
      <div id="t1_tips" aria-hidden="true" style="display: inline-block; position: relative;">
        <img src="../../lib/icon/all.png" alt="" class="weui-tabbar__icon"/>
        <!--<span class="weui-badge" style="position: absolute; top: -2px; right: -13px;">8</span>-->
      </div>
      <p id="t1_title" aria-hidden="true" class="weui-tabbar__label">信息查询</p>
    </div>
    <div id="tab2" role="tab" aria-labelledby="t2_title" aria-selected="false" aria-controls="panel2" class="weui-tabbar__item">
      <img src="../../lib/icon/user-center.png" alt="" class="weui-tabbar__icon"/>
      <p aria-hidden="true" id="t2_title" class="weui-tabbar__label">我</p>
    </div>
  </div>
</div>
<!--</div>-->
<script type="text/javascript">
  $(function(){
    $('.weui-tabbar__item').on('click', function () {
      $(this).attr('aria-selected','true').addClass('weui-bar__item_on');
      $(this).siblings('.weui-bar__item_on').removeClass('weui-bar__item_on').attr('aria-selected','false');
      var panelId = '#' + $(this).attr('aria-controls');
      $(panelId).css('display','block');
      $(panelId).siblings('.weui-tab__panel').css('display','none');
    });
  });
  
/*  var xhr = new XMLHttpRequest();
  $(function(){
    let $link1 = $('#link1');
    xhr.onreadystatechange= ()=>{
      if (xhr.readyState === 4){
        //alert(xhr.status)
        if (xhr.status === 200) {
        }
      }
    }
    $link1.on('click', function(){
      location.href="/wx/third/verifytoken"
    });
  });*/
  
  //解绑活动页
  $(function(){
    var $iosActionsheet = $('#iosActionsheet');
    var $iosMask = $('#iosMask');
    
    function hideActionSheet() {
      $iosActionsheet.removeClass('weui-actionsheet_toggle').attr('aria-hidden','true');
      $iosMask.fadeOut(200);
      $('#showIOSActionSheet').trigger('focus');
    }
    
    $iosMask.on('click', hideActionSheet);
    $('#iosActionsheetCancel').on('click', hideActionSheet);
    $("#showIOSActionSheet").on("click", function(){
      $iosActionsheet.attr('aria-hidden','false').addClass('weui-actionsheet_toggle');
      $iosMask.fadeIn(200);
      setTimeout(function(){
        $('#current1').trigger('focus');
      },200)
    });
    
    $('#unbind').on('click', function(){
      http({
        url:'/thirdUser/unbind',
        method: 'delete'
      }).then(response => {
        console.log(response)
        if (response.data.code === 200 ){
          location.href = baseURL + '/web/index/index.html'
        }
      })
    })
  })
  
  const vm = new Vue({
    el:'#root',
    data:{
    
    },
    methods: {
      link1(){
        location.href= baseURL + '/web/stu/academic_status.html'
      }
    }
  })
</script>
</body>
</html>